package com.acsior.hibernate.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.acsior.dac.impl.hibernate.vo.GeneratorKey;
import com.acsior.dac.impl.hibernate.vo.HibernatePersistantIntegerIdVO;

/**
 * SubscriptionPlan entity. @author MyEclipse Persistence Tools <b><i>powered by
 * Belev</i></b>
 */
@Entity
@Table(name = "subscription_plans")
@GeneratorKey(tableName = "subscription_plans")
public class SubscriptionPlanVO extends HibernatePersistantIntegerIdVO {

	private static final long serialVersionUID = -8155926013089860536L;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "nom_periodicity_id", nullable = false)
	private NomPeriodicityVO nomPeriodicity;

	@Column(name = "plan_price", nullable = false, scale = 4)
	private double planPrice;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "subscription_catalog_id", nullable = false)
	private SubscriptionCatalogVO subscriptionCatalog;

	/** default constructor */
	public SubscriptionPlanVO() {
		super();
	}

	/** @return the nomPeriodicity */
	public NomPeriodicityVO getNomPeriodicity() {
		return this.nomPeriodicity;
	}

	/** @return the planPrice */
	public double getPlanPrice() {
		return this.planPrice;
	}

	/** @return the subscriptionCatalog */
	public SubscriptionCatalogVO getSubscriptionCatalog() {
		return this.subscriptionCatalog;
	}

	/** @param nomPeriodicity */
	public void setNomPeriodicity(NomPeriodicityVO nomPeriodicity) {
		this.nomPeriodicity = nomPeriodicity;
	}

	/** @param planPrice */
	public void setPlanPrice(double planPrice) {
		this.planPrice = planPrice;
	}

	/** @param subscriptionCatalog */
	public void setSubscriptionCatalog(SubscriptionCatalogVO subscriptionCatalog) {
		this.subscriptionCatalog = subscriptionCatalog;
	}

}